﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;
using System.Windows.Input;

namespace BaffoHat.Wpf.Controls
{
    public class TraditionalMouse : IMouse
    {
        public event MouseMoveEventHandler MouseMove;

        public TraditionalMouse()
        {
            CompositionTarget.Rendering += new EventHandler(CompositionTarget_Rendering);
        }

        void CompositionTarget_Rendering(object sender, EventArgs e)
        {
            Point point = Mouse.GetPosition(Application.Current.MainWindow);

            if (MouseMove != null)
                MouseMove(this, new MouseMoveEventArgs(point));
        }


        public bool IsReady
        {
            get { return true; }
        }

        public void Dispose()
        {
            
        }
    }
}
